<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="author" content="ISUX">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <link rel="stylesheet" type="text/css" href="../frozen/css/frozen.css">
    <link rel="stylesheet" type="text/css" href="../css/default.css">
    <title>火堆</title>
    <link rel="stylesheet" type="text/css" href="../css/project_closing.css">
    <link rel="stylesheet" type="text/css" href="${resource(dir: 'venobox', file: 'venobox.css')}" media="screen" />
     <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>	
    
    <style type="text/css">
.form-imgs .img-box1 {
     display: inline-block; 
     width: 23.5%; */
     height: 0; */
     margin: 1% 1%; 
    padding-bottom: 23.6%;
    background-color: #fff;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  
    -webkit-transition: all .1s;
    transition: all .1s;
    position: relative;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
}
    
    
    </style>
</head>

<body>
<input type="hidden"  id="descriptionTip" value="${shareDetail}"/>
<input type="hidden"  id="nameTip" value="${project.name}"/>
	<script type="text/javascript">
	wx.config({
 	    debug: false,  // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
 	    appId: '${appid}', // 必填，公众号的唯一标识
 	    timestamp: "${timestamp}", // 必填，生成签名的时间戳
 	    nonceStr: '${nonceStr}', // 必填，生成签名的随机串
 	    signature: '${signature}',// 必填，签名，见附录1
 	    jsApiList: ['checkJsApi' , 'onMenuShareAppMessage' , 'onMenuShareTimeline']
 	});

 	wx.ready(function(){
 		wx.checkJsApi({
 		    jsApiList: ['onMenuShareAppMessage' , 'onMenuShareTimeline'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
 		    success: function(res) {
 		       //alert('wx.check: '+JSON.stringify(res));
 		    }
 		});
 		//发送给朋友分享功能
 		wx.onMenuShareAppMessage({
 		    title: "“"+$("#nameTip").val()+"”善款使用和结项反馈-火堆公益", // 分享标题
 		    desc: $("#descriptionTip").val(), // 分享描述
 		    link: '${shareUrl}', // 分享链接
 		    imgUrl: '${imgUrl}', // 分享图标
			trigger: function () {
			//alert("点击按钮");
			},
 		    success: function () { 
 		        // 用户确认分享后执行的回调函数
 		    },
 		    cancel: function () { 
 		        // 用户取消分享后执行的回调函数
 		    }
 		});
 		//分享到朋友圈
 		wx.onMenuShareTimeline({
 		    title: "“"+$("#nameTip").val()+"”善款使用和结项反馈-火堆公益", // 分享标题
 		    link: '${shareUrl}', // 分享链接
 		    imgUrl: '${imgUrl}',  // 分享图标
 		    success: function () { 
 		        // 用户确认分享后执行的回调函数
 		    },
 		    cancel: function () { 
 		        // 用户取消分享后执行的回调函数
 		    }
 		});

 	});
 	wx.error(function (res) {
		//alert('wx.error: '+JSON.stringify(res));
    });
    
	</script>
 	<footer class="ui-footer ui-footer-stable ui-border-t">
        <div class="ui-footer-btns">
            <button type="button"   class="btn-submit-all btn-footer btn-red" onclick="submitAll();">查看此项目</button>
        </div>
    </footer>
    <section class="ui-container">
        <g:form id="projectClosingForm" url="[resource:projectClosingInstance, action:'savProjectCloseing']" method="post" >
         <input type="hidden" name="projectid" value="${project.id}">
         <g:if test="${projectClosing?.id}">
         <input type="hidden" name="id" value="${projectClosing?.id}">
         </g:if>
            <div class="u-module ">
                <div class="ui-form form-common2 ui-border-tb">
                    <div class="ui-form-item ">
                        <label for="#">项目名称</label>
                        <p class="txt" style="width:auto;">${project.name}</p>
                    </div>
                     <div class="ui-form-item ui-border-tb">
                        <label for="#">筹款目标</label>
                        <p class="txt" style="width:auto;"><em><g:formatNumber number="${project.amount}" format="0.00"/></em> 元</p>
                    </div>
                    <div class="ui-form-item ">
                        <label for="#">筹款总额</label>
                        <p class="txt" style="width:auto;"><em><g:formatNumber number="${project.realAmount}" format="0.00"/></em> 元</p>
                    </div>
                    <div class="ui-form-item ui-border-tb">
                        <label for="#">接收总额</label>
                        <p class="txt" style="width:auto;"><em><g:formatNumber number="${payment/100}" format="0.00"/></em> 元</p>
                    </div>
                </div>
            </div>
             <div class="u-module-title" style="font-size: 12px;line-height: 16px;color: #a89e99;"> 若筹款总额超过筹款目标，超额的善款会进入“火堆爱心池”，用于支持其他公益项目。</div>
            <div class="u-module-title">善款使用</div>
            <div class="u-module">
                <div class="ui-form form-common2">
                    <div class="ui-form-item ui-border-tb">
                        <label for="#">实际花费</label>
                        <p class="txt" style="width:auto;"><em><g:formatNumber number="${projectClosing?.realSpend}" format="0.00"/></em> 元</p>
                    </div>
                    <div class="ui-form-item ui-border-b">
                        <label for="#">发票总额</label>
                        <p class="txt" style="width:auto;"><em><g:formatNumber number="${projectClosing?.tltalInvoice}" format="0.00"/></em> 元</p>
                    </div>
                    <div class="ui-form-item ui-form-item-textarea" style="padding-right: 15px;">
                        <label for="#">善款明细</label>
                        <textarea class="count-num" data-length="500" name="fundraisingDetail" readonly="readonly" >${projectClosing?.fundraisingDetail}</textarea>
                        
                    </div>
                    <div class="form-imgs form-imgs1" data-index="${1}" data-max-length="4">
                     
                     <g:each in="${projectClosing?.invoiceImgs}" var="pic" status="i">
                     <a class="venobox" data-gall="gall2" title="" href="/scfire/project/imgRead?img=${pic}"><div class="img-box1" style="background-image:url(/scfire/project/imgRead?img=${pic})">
                        </div> </a>
                     </g:each>
                    </div>
                    <div class="form-imgs-hint ui-border-b">
                    </div>
                </div>
            </div>
            <div class="u-module-title">项目执行</div>
            <div class="u-module">
                <div class="ui-form form-common2">
                    <div class="ui-form-item ui-border-tb">
                        <label for="#">受益人群</label>
                        <input class="count-num" type="text"  data-length="30" name="profitPeople" value="${projectClosing?.profitPeople } " readonly="readonly">
                    </div>
                    <div class="ui-form-item ui-border-b">
                        <label for="#">受益人数</label>
                        <p class="txt" style="width:auto;"><em>${projectClosing?.profitNum }</em> 人</p>
                    </div>
                    <div class="ui-form-item ui-form-item-textarea" style="padding-right: 15px;">
                        <label for="#">结项概述</label>
                        <textarea class="count-num"  data-length="500" name="summary"  readonly="readonly" >${projectClosing?.summary }</textarea>
                    </div>
                     <div class="form-imgs form-imgs2" data-index="1" data-max-length="8">
                      
                     <g:each in="${projectClosing?.summaryImgs}" var="pic" status="i">
                     <a class="venobox" data-gall="gall1" title="" href="/scfire/project/imgRead?img=${pic}"><div class="img-box1" style="background-image:url(/scfire/project/imgRead?img=${pic})">
                        </div> </a>
                     
                     <%-- <div class="img-box"  style="background-image:url(/scfire/project/imgRead?img=${pic})">
                        </div> --%>
                     </g:each>
                    </div>
                    <div class="form-imgs-hint ui-border-b">
                       
                    </div>
                </div>
            </div>
        </g:form>
        <br>
        <br>
    </section>
<script type="text/javascript"
		src="${resource(dir: 'js', file: 'jquery-1.10.2.js')}"></script>
	<script type="text/javascript"
		src="${resource(dir: 'js', file: 'ajaxfileupload.js')}"></script>
    <script src="../frozen/lib/zeptojs/zepto.min.js"></script>
    <script src="../frozen/js/frozen.js"></script>
    <script src="../venobox/venobox.min.js"></script>
    <script type="text/javascript">

    function submitAll(){ 
    	window.location.href ="/scfire/project/projectDetail?projectid=${project.id}"
    }
    

    
    (function() {
     	
        $('.venobox').venobox({
            numeratio: true,
            border: '20px'
        });
        $('.venoboxvid').venobox({
            bgcolor: '#000'
        });
        $('.venoboxframe').venobox({
            border: '6px'
        });
        $('.venoboxinline').venobox({
            framewidth: '300px',
            frameheight: '250px',
            border: '6px',
            bgcolor: '#f46f00'
        });
        $('.venoboxajax').venobox({
            border: '30px;',
            frameheight: '220px'
        });
    })();
    
    
    </script>
    
</body>
</html>
